<html>
<head><meta charset="utf-8"><title>Cache paths · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html">Cache paths</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="244655006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244655006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244655006">(Jul 02 2021 at 03:00)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/86798">https://github.com/rust-lang/rust/issues/86798</a> is probably causing lots of bugs :/ if someone has time it would be nice to look into</p>



<a name="244658998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244658998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244658998">(Jul 02 2021 at 04:38)</a>:</h4>
<p>I can take a look <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="244819243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819243">(Jul 03 2021 at 18:55)</a>:</h4>
<p>Okay this is going to be annoying and hard to fix. I nailed it down to 4-5 tests that are failing, but I can't figure it out right now.</p>



<a name="244819308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819308">(Jul 03 2021 at 18:57)</a>:</h4>
<p>yeah that was about what I expected <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="244819356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819356">(Jul 03 2021 at 18:58)</a>:</h4>
<p>If I fix one test, another one is failing, if I fix that one, the other one is failing again <span aria-label="sad" class="emoji emoji-2639" role="img" title="sad">:sad:</span></p>



<a name="244819374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819374">(Jul 03 2021 at 18:59)</a>:</h4>
<p>what approach are you taking? merge everything into paths?</p>



<a name="244819409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819409">(Jul 03 2021 at 18:59)</a>:</h4>
<p>Yes. Everything is in one map right now.</p>



<a name="244819574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819574">(Jul 03 2021 at 19:02)</a>:</h4>
<p>ok. and what tests are failing?</p>



<a name="244819582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819582">(Jul 03 2021 at 19:02)</a>:</h4>
<p>I can send you later. I'm working on another PR right now <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="244819594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819594">(Jul 03 2021 at 19:03)</a>:</h4>
<p>haha <a href="https://github.com/rust-lang/rust/pull/86644">https://github.com/rust-lang/rust/pull/86644</a> is super useful too :)</p>



<a name="244819596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819596">(Jul 03 2021 at 19:03)</a>:</h4>
<p>have you tried worktrees btw?</p>



<a name="244819604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819604">(Jul 03 2021 at 19:03)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/building/suggested.html#working-on-multiple-branches-at-the-same-time">https://rustc-dev-guide.rust-lang.org/building/suggested.html#working-on-multiple-branches-at-the-same-time</a></p>



<a name="244819631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819631">(Jul 03 2021 at 19:04)</a>:</h4>
<p>I kinda use them. Right now I have two worktrees but I need more haha</p>



<a name="244819651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819651">(Jul 03 2021 at 19:04)</a>:</h4>
<p>since <a href="https://github.com/rust-lang/rust/pull/82653">https://github.com/rust-lang/rust/pull/82653</a> it should be super cheap to add more :)</p>



<a name="244819653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819653">(Jul 03 2021 at 19:04)</a>:</h4>
<p>err I guess that isn't merged yet</p>



<a name="244819654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819654">(Jul 03 2021 at 19:04)</a>:</h4>
<p>but you can cherry-pick it</p>



<a name="244819674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819674">(Jul 03 2021 at 19:05)</a>:</h4>
<p>Thats pretty cool</p>



<a name="244819814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819814">(Jul 03 2021 at 19:09)</a>:</h4>
<p>/me currently has 4 worktrees <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span> </p>
<p>but I haven't used the 4th in a while</p>



<a name="244819893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244819893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244819893">(Jul 03 2021 at 19:10)</a>:</h4>
<p>Now I have 3 tmux windows, in every one is a separate rustc setup to work on haha</p>



<a name="244820265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244820265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244820265">(Jul 03 2021 at 19:20)</a>:</h4>
<div class="codehilite"><pre><span></span><code>failures:
    [rustdoc] rustdoc/elided-lifetime.rs
    [rustdoc] rustdoc/hidden-impls.rs
    [rustdoc] rustdoc/intra-doc/cross-crate/submodule-outer.rs
    [rustdoc] rustdoc/sidebar-links-to-foreign-impl.rs
</code></pre></div>
<p>These are the failing tests. If I try to fix <code>hidden-impls.rs</code>, <code>rustdoc/issue-43701.rs </code> is apparently failing, as were they mutually exclusive</p>



<a name="244820275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244820275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244820275">(Jul 03 2021 at 19:21)</a>:</h4>
<p>Both of these have to do with <a href="https://github.com/rust-lang/rust/blob/56dee7c49ecdec4c2c9eccc6ff966cf58847bda6/src/librustdoc/html/render/write_shared.rs#L531">this</a> line:</p>



<a name="244820341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244820341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244820341">(Jul 03 2021 at 19:23)</a>:</h4>
<p><code>elided-lifetime.rs</code> is about a missing link in the re-exported methods return type</p>



<a name="244820410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244820410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244820410">(Jul 03 2021 at 19:25)</a>:</h4>
<p>I can open a WIP PR so you can see yourself. But I have a hard time figuring out why these are failing. Maybe you can find out faster</p>



<a name="244820455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244820455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244820455">(Jul 03 2021 at 19:26)</a>:</h4>
<p>probably not <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> rustdoc is way too complicated</p>



<a name="244820462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244820462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244820462">(Jul 03 2021 at 19:26)</a>:</h4>
<p>at a guess, I would <em>expect</em> the issue to be a missing <code>is_local()</code> check somewhere?</p>



<a name="244820464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244820464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244820464">(Jul 03 2021 at 19:26)</a>:</h4>
<p>but I've never seen these tests before</p>



<a name="244853545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244853545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244853545">(Jul 04 2021 at 10:50)</a>:</h4>
<p>Like <span class="user-mention" data-user-id="232545">@Joshua Nelson</span> said mostly. If it can help: maybe we should make it into an enum so then it would be enforced by the type directly wether it's local or not. It'd require more changes but it will be impossible to forget a check. :)</p>



<a name="244853562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244853562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244853562">(Jul 04 2021 at 10:51)</a>:</h4>
<p>(I mean a map of enum where paths are variants of the enum)</p>



<a name="244880956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244880956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244880956">(Jul 04 2021 at 22:37)</a>:</h4>
<p>In general, it feels like enums are the secret to improving rustdoc's code quality :)</p>



<a name="244893806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244893806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244893806">(Jul 05 2021 at 04:41)</a>:</h4>
<p>That’s a good idea. I will try that</p>



<a name="244932614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244932614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244932614">(Jul 05 2021 at 12:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="307537">Noah Lev</span> <a href="#narrow/stream/266220-rustdoc/topic/Cache.20paths/near/244880956">said</a>:</p>
<blockquote>
<p>In general, it feels like enums are the secret to improving rustdoc's code quality :)</p>
</blockquote>
<p>That's generally a good way to ensure that specific checks are not forgotten. :)</p>



<a name="244961572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/244961572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#244961572">(Jul 05 2021 at 18:00)</a>:</h4>
<p>Already worked awesome with fake def ids ;)</p>



<a name="245063187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245063187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245063187">(Jul 06 2021 at 16:20)</a>:</h4>
<p>Damn. Enums are really awesome. I converted all paths to use enums and only two tests failing and they were super easy to fix.</p>



<a name="245063733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245063733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245063733">(Jul 06 2021 at 16:25)</a>:</h4>
<p>Pull Request is <a href="https://github.com/rust-lang/rust/pull/86909">up</a></p>



<a name="245072247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245072247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245072247">(Jul 06 2021 at 17:32)</a>:</h4>
<p>holy shit rustdoc is soo much fun. Gimme more issues like the DefId and the Cache paths ones :)</p>



<a name="245100195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245100195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245100195">(Jul 06 2021 at 21:19)</a>:</h4>
<p>If you have time and motivation, you can review <a href="https://github.com/rust-lang/rust/pull/86841">https://github.com/rust-lang/rust/pull/86841</a> if you want. ;)</p>



<a name="245100521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245100521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245100521">(Jul 06 2021 at 21:22)</a>:</h4>
<p>Otherwise I approved your PR, nice job! Maybe <span class="user-mention" data-user-id="232545">@Joshua Nelson</span> wants to take a look too so I'll approve in a few days if he doesn't have time. (ping me otherwise I'll forget)</p>



<a name="245121839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245121839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245121839">(Jul 07 2021 at 03:05)</a>:</h4>
<p>left a review</p>



<a name="245121842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245121842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245121842">(Jul 07 2021 at 03:05)</a>:</h4>
<p>sorry to burst your bubble :(</p>



<a name="245121927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245121927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245121927">(Jul 07 2021 at 03:07)</a>:</h4>
<p><span class="user-mention silent" data-user-id="230287">Stu</span> <a href="#narrow/stream/266220-rustdoc/topic/Cache.20paths/near/245072247">said</a>:</p>
<blockquote>
<p>holy shit rustdoc is soo much fun. Gimme more issues like the DefId and the Cache paths ones :)</p>
</blockquote>
<p><a href="https://github.com/rust-lang/rust/issues/84619">https://github.com/rust-lang/rust/issues/84619</a> and <a href="https://github.com/rust-lang/rust/issues/84304">https://github.com/rust-lang/rust/issues/84304</a>, I would describe all three as "pretty hard"</p>



<a name="245121948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245121948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245121948">(Jul 07 2021 at 03:07)</a>:</h4>
<p>but not "give up on the whole thing and create an MCP to change the compiler to make rustdoc's life easier" hard which is currently the hardest I've found <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> <a href="https://github.com/rust-lang/rust/issues/83761">https://github.com/rust-lang/rust/issues/83761</a></p>



<a name="245145179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245145179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245145179">(Jul 07 2021 at 08:22)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/266220-rustdoc/topic/Cache.20paths/near/245121842">said</a>:</p>
<blockquote>
<p>sorry to burst your bubble :(</p>
</blockquote>
<p>It's fine, I'm glad you reviewed it (I was surprised there was no change in the tests but didn't think much of it). However I think the approch is the correct one: having an enum to prevent forgetting the <code>def_id.is_local()</code> is a good idea in my opinion. However it needs to be correctly filled as well</p>



<a name="245176156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245176156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245176156">(Jul 07 2021 at 13:07)</a>:</h4>
<p><span class="user-mention" data-user-id="210316">@GuillaumeGomez</span> the problem is they are not in sync. The code enforces a check on the value, not the key, and it's possible for the DefId to be local without the value being local and vice versa. So I think introducing a check on the value is the wrong approach.</p>



<a name="245176271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245176271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245176271">(Jul 07 2021 at 13:08)</a>:</h4>
<p>(and I'm dubious that it's <em>so</em> common to treat local paths differently we need to enforce it)</p>



<a name="245185326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245185326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245185326">(Jul 07 2021 at 14:06)</a>:</h4>
<p>Thanks for the explanations. Then indeed, my approach was the wrong one</p>



<a name="245594911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245594911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245594911">(Jul 11 2021 at 08:02)</a>:</h4>
<p>So I reworked my code and now I combined both solutions. The <code>paths</code> map is still a <code>HashMap&lt;DefId, CachedPath&gt;</code>, but on every insert I check if DefId and cached path match. This works really well and there are only 3 tests still failing, which are super annoying to fix because I think they relied on that there were external <code>DefId</code>s  in the old <code>paths</code> map</p>



<a name="245606431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245606431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245606431">(Jul 11 2021 at 13:13)</a>:</h4>
<p><span class="user-mention" data-user-id="230287">@Stu</span> yeah that sounds annoying - you're allowed to update the usage sites btw, if checking <code>extern_paths</code> in addition or something works than that seems reasonable :)</p>



<a name="245606714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245606714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245606714">(Jul 11 2021 at 13:19)</a>:</h4>
<p>Yea I try to, but it's hard because I have no idea how some of the problems worked before my changes.</p>



<a name="245607104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245607104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245607104">(Jul 11 2021 at 13:27)</a>:</h4>
<p>So one of the problems is that the <code>elided-lifetime.rs</code> test is failing because the return types on the re-exported methods do not have an anchor to the struct. This is caused because the crate that is <code>inline</code>d has an <code>Unknown</code> external location which causes <a href="https://github.com/rust-lang/rust/blob/4581c4ef6ff388dd624bdceb484fb03c33d7bae4/src/librustdoc/html/format.rs#L505">this</a> branch to be taken so <code>None</code> is returned and there is no link.</p>



<a name="245607198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245607198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245607198">(Jul 11 2021 at 13:29)</a>:</h4>
<p>Wait, I think I know why. Writing out a problem really seems to help <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="245607732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245607732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245607732">(Jul 11 2021 at 13:44)</a>:</h4>
<p>Okay nvm. I still have no idea</p>



<a name="245610457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245610457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245610457">(Jul 11 2021 at 14:48)</a>:</h4>
<p><span class="user-mention" data-user-id="230287">@Stu</span> if it's inlined, it shouldn't be in the external crate, rustdoc should copy the documentation into the current crate</p>



<a name="245610462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245610462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245610462">(Jul 11 2021 at 14:49)</a>:</h4>
<p>hmm, are you maybe checking the DefId of the original definition instead of the <code>use</code>?</p>



<a name="245610620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Cache%20paths/near/245610620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stu <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Cache.20paths.html#245610620">(Jul 11 2021 at 14:53)</a>:</h4>
<p>It's not an actual <code>use</code> item. It's an <code>extern crate</code> one</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#[doc(inline)]</span><span class="w"></span>
<span class="k">extern</span><span class="w"> </span><span class="k">crate</span><span class="w"> </span><span class="n">bar</span><span class="p">;</span><span class="w"></span>
</code></pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>